package cn.stylefeng.guns.modular.system.service;

import cn.stylefeng.guns.modular.system.entity.SysUserProfitExtractLog;
import cn.stylefeng.guns.modular.system.mapper.SysUserProfitExtractLogMapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;

/**
 * <p>
 * 用户收益提现记录 服务类
 * </p>
 *
 * @author zfy
 * @since 2020-08-13
 */
@Service
public class SysUserProfitExtractLogService
        extends ServiceImpl<SysUserProfitExtractLogMapper,SysUserProfitExtractLog> {

    public void profitExtractLogAdd (Long userId,Double profit){
        SysUserProfitExtractLog extractLog = new SysUserProfitExtractLog();
        extractLog.setUserId(userId);
        extractLog.setProfit(profit);
        extractLog.setCreaTime(LocalDateTime.now());
        this.save(extractLog);
    }

}
